package com.example.demo.math;

public class Test111 {

    public static void main(String[] args) {
        String str = "1000";
        for (int i =0;i<4;i++){
            char ch = str.charAt(i);
            String strAdd = str.substring(0, i) + (ch == '9' ? 0 : ch - '0' + 1) + str.substring(i + 1);
            String strSub = str.substring(0, i) + (ch == '0' ? 9 : ch - '0' - 1) + str.substring(i + 1);
            System.out.println(strAdd+","+strSub);
        }
    }

}



class TD{

    public static void main(String[] args) {
        char c = '1';
        System.out.println(c-'0'+1);
    }
}